package com.microlecture.service.impl;

import com.microlecture.entity.Food;
import com.microlecture.mapper.FoodMapper;
import com.microlecture.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FoodServiceImpl implements FoodService {

    @Autowired
    private FoodMapper foodMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return foodMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(Food record) {
        return foodMapper.insertSelective(record);
    }

    @Override
    public Food selectByPrimaryKey(Integer id) {
        return foodMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Food record) {
        return foodMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<Food> selectList() {
        return foodMapper.selectList();
    }
}